﻿using System;
using System.Collections.Generic;

namespace JNPF.Basics.Models.PlatForm.Dtos.TimeTask
{
    public class TimeTaskInfoOutput
    {
        /// <summary>
        /// 任务名称
        /// </summary>
        public string fullName { get; set; }
        /// <summary>
        /// 任务类型(1-请求接口，2-存储过程)
        /// </summary>
        public string executeType { get; set; }
        /// <summary>
        /// 功能描述
        /// </summary>
        public string description { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string executeContent { get; set; }
        public long? sortCode { get; set; }
        public string enCode { get; set; }
    }

    public class FrequencyListItem
    {
        /// <summary>
        /// 执行小时
        /// </summary>
        public string hours { get; set; }
        /// <summary>
        /// 执行分钟
        /// </summary>
        public string minute { get; set; }
        /// <summary>
        /// 执行月
        /// </summary>
        public string month { get; set; }
        /// <summary>
        /// 执行日类型（1-每日，2-每周，3-每月）
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 每周几
        /// </summary>
        public string week { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string moth { get; set; }
        /// <summary>
        /// 每月几日
        /// </summary>
        public string day { get; set; }
    }

    public class ParameterItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string key { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string value { get; set; }
    }

    public class StoredParameterItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string key { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string value { get; set; }
    }

    public class ExecuteContent
    {
        /// <summary>
        /// 开始时间类型(1-立即执行，2-设置开始时间)
        /// </summary>
        public string start { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? startTime { get; set; }
        /// <summary>
        /// 执行频率(1-执行一次，2-重复执行，3-调度明细，4- 调度任务)
        /// </summary>
        public string frequency { get; set; }
        /// <summary>
        /// 重复执行-秒
        /// </summary>
        public string seconds { get; set; }
        /// <summary>
        /// 重复执行-分
        /// </summary>
        public string minute { get; set; }
        /// <summary>
        /// 重复执行-小时
        /// </summary>
        public string hours { get; set; }
        /// <summary>
        /// 重复执行-下拉框-天
        /// </summary>
        public string day { get; set; }
        /// <summary>
        /// 重复执行-月
        /// </summary>
        public string month { get; set; }
        /// <summary>
        /// 重复执行-下拉框-周
        /// </summary>
        public string week { get; set; }
        /// <summary>
        /// 调度任务下拉框值
        /// </summary>
        public string cron { get; set; }
        /// <summary>
        /// 调度明细内容
        /// </summary>
        public List<FrequencyListItem> frequencyList { get; set; }
        /// <summary>
        /// 结束时间类型(1-无限制，2-设置结束时间)
        /// </summary>
        public string end { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? endTime { get; set; }
        /// <summary>
        /// 任务重启
        /// </summary>
        public string restart { get; set; }
        /// <summary>
        /// 间隔时间
        /// </summary>
        public string restartFrequency { get; set; }
        /// <summary>
        /// 重启次数
        /// </summary>
        public string restartTime { get; set; }
        /// <summary>
        /// 请求类型(GET-Get,POST-Post)
        /// </summary>
        public string interfaceType { get; set; }
        /// <summary>
        /// 请求路径
        /// </summary>
        public string interfaceUrl { get; set; }
        /// <summary>
        /// 请求接口请求参数
        /// </summary>
        public List<ParameterItem> parameter { get; set; }
        /// <summary>
        /// 存储名称
        /// </summary>
        public string stored { get; set; }
        /// <summary>
        /// 数据库id
        /// </summary>
        public string database { get; set; }
        /// <summary>
        /// 存储过程参数
        /// </summary>
        public List<StoredParameterItem> storedParameter { get; set; }
    }
}
